Refactor versioning process#3714
Conversation
Does the PR have any schema changes?Looking good! No breaking changes found. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3714 +/- ##
=========================================
Coverage ? 56.31%
=========================================
Files ? 74
Lines ? 11735
Branches ? 0
=========================================
Hits ? 6609
Misses ? 4635
Partials ? 491 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
- Remove cobra entry point. - Keep only CompareAll function. - Copy isVersionedName and versionlessName from schema-tools/pkg. - Pass schema and result via objects instead of via disk. - Copy existing tests.
- Generate raw-schema in-memory then immediately squeeze and output the result. - Derive filename from current major version in makefile. - Remove schema-tools from makefile.
- Expose OpenApi providers from the BuildSchema function to avoid loading twice. - Remove obsolete makefile dependency on the full-schema - we introduced the raw-schema to avoid this dependency.
This is no longer calculated during the BuildSchema process - only read in as it's generated at the same time as the removed resources.
- Pass openapi.AzureProviders in as a "source". - Add documentation comments for some nested data structures.
a6697f3 to
b75dcde
Compare
thomas11
left a comment
There was a problem hiding this comment.
LGTM with nits. Great start to a proper test suite! The readability of nested subtests is a matter of taste, I guess.
Would you think a single level of nesting with longer test names is better instead? Edit: flattened to a single level of nesting - just grouped by the function under test. |
We incorrectly assumed that extracted keys were in order when Go actually randomises the order of keys while iterating. - Require keys to be of an ordered type. - Use the built-in slices.Max generic function.
Describe basic behaviour of version selection process via structured test cases.
b75dcde to
1faedac
Compare
|
This PR has been shipped in release v2.73.0. |
gen raw-schema+schema-tools squeezeintogen squeeze.BuildSchema.BuildSchemainternal methods.Precursor to implementing #2661